<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
	prefix="tiles"%>

<rich:panel header="#{messages['rci.booking.entry.mgmt.menu']}">
	<h:panelGrid width="100%" columns="1">
		<h:panelGroup>
			<h:panelGrid>
				<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
			</h:panelGrid>		
		</h:panelGroup>
		
		<h:panelGroup>
			<h:panelGrid width="100%">
				<h:panelGroup>
				    <h:outputText value="#{messages['rci.booking.entry']}" styleClass="sub_header" />
					<h:outputText value="*" styleClass="standardText_Mandatory" />
					<h:outputText value="#{messages['instruction']}" styleClass="standardText_Instruction" />
				</h:panelGroup>
			</h:panelGrid>
		</h:panelGroup>
		
	</h:panelGrid>
	
	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		
		 <h:panelGroup>
			<h:outputLabel  value="#{messages['rci.bulk.bank.deposit.label']}" styleClass="standardText_Label" />
		 </h:panelGroup>
         <h:panelGroup>
			<h:panelGrid columns="3">
				<t:inputText  readonly="true" size="5" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciBulkBank.year}"></t:inputText>
				<t:inputText  readonly="true" size="7"  styleClass="standardText" value=" Week #{adminRCIBean.rciBookingEntry.rciBulkBank.week} "></t:inputText>
				<t:inputText  readonly="true" size="20" styleClass="standardText" value=" #{adminRCIBean.rciBookingEntry.rciBulkBank.partnerProduct.name} "></t:inputText>
			</h:panelGrid>
        </h:panelGroup>
        

	    <h:panelGroup>
			<h:outputLabel for="rciType" value="#{messages['rci.type']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
           <t:inputText  readonly="true"  styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciType}"></t:inputText>
		</h:panelGroup>		

		<h:panelGroup  rendered="#{adminRCIBean.incomingMember}">
			<h:outputLabel for="rciSplitWeekConfigId" value="#{messages['rci.split.week']}" styleClass="standardText_Label" />
		</h:panelGroup>
	    <t:inputText rendered="#{adminRCIBean.incomingMember}"  readonly="true"  styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciSplitWeekConfig.rciSplitWeekDesc}"></t:inputText>

		<h:panelGroup >
			<h:outputLabel  value="#{messages['rci.member']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText  readonly="true"  styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciMemberFullName}"></t:inputText>

		<h:panelGroup >
			<h:outputLabel  value="#{messages['booking.checkin.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText  readonly="true"  styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciCheckInDate}">
			<f:convertDateTime pattern="dd/MM/yyyy" timeZone="Asia/Kuala_Lumpur"/>
		</t:inputText>

		<h:panelGroup >
			<h:outputLabel  value="#{messages['booking.checkout.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText  readonly="true"  styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.rciCheckOutDate}">
			<f:convertDateTime pattern="dd/MM/yyyy" timeZone="Asia/Kuala_Lumpur"/>
		</t:inputText>

		<h:outputText></h:outputText>
		<t:message for="confirmationNo" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="confirmationNo" value="#{messages['booking.confirmation.no.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:inputText id="confirmationNo" size="50" maxlength="50" required="true" styleClass="standardText" value="#{adminRCIBean.rciBookingEntry.confirmationNo}"></t:inputText>
		
		<h:outputText></h:outputText>
		<t:message for="confirmationDate" styleClass="error"></t:message>
		<h:panelGroup>
	    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
		    <h:outputLabel for="confirmationDate" value="#{messages['booking.confirmation.date.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
		    	<t:inputCalendar
		    	id="confirmationDate"
					monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" 
					currentDayCellClass="currentDayCell" value="#{adminRCIBean.rciBookingEntry.confirmationDate}"
					renderAsPopup="true" popupTodayString="#{messages['popup.today']}"
					popupWeekString="#{messages['popup.week']}" popupDateFormat="dd/MM/yyyy"
					renderPopupButtonAsImage="true"
					styleClass="standardText" required="true"
		    	>
		    	</t:inputCalendar>
		</h:panelGroup>

		<rich:spacer height="10"></rich:spacer>
		
		<t:panelGroup>
		   <t:panelGrid columns="3">
		   		<h:commandButton value="#{messages['aprrove']}" styleClass="button" action="#{adminRCIBean.approvalRCIBookingEntryAction}" actionListener="#{adminRCIBean.approveRCIBookingEntryActionListener}"></h:commandButton>
			    <h:commandButton value="#{messages['reject']}" styleClass="button" action="#{adminRCIBean.approvalRCIBookingEntryAction}" actionListener="#{adminRCIBean.rejectRCIBookingEntryActionListener}"></h:commandButton>
			    <h:commandButton value="#{messages['back']}" styleClass="button" action="#{adminRCIBean.backToPartnerPortal}"  immediate="true"></h:commandButton>
		   </t:panelGrid>
		</t:panelGroup>
	</t:panelGrid>
</rich:panel>	